package com.example.easypoi.entity;

import lombok.Data;
import org.jeecgframework.poi.excel.annotation.Excel;
import org.jeecgframework.poi.excel.annotation.ExcelTarget;
import org.jeecgframework.poi.excel.annotation.ExcelVerify;

@Data
@ExcelTarget("user")
public class UserIn {
    @Excel(name = "用户ID", width = 15)
    private Long id;

    @Excel(name = "姓名", width = 20)
    private String name;

    @Excel(name = "手机号", width = 15)
    @ExcelVerify(isMobile = true) // 手机号校验
    private String phone;

    @Excel(name = "邮箱", width = 25)
    @ExcelVerify(isEmail = true) // 邮箱校验
    private String email;

    @Excel(name = "头像", type = 2, width = 20, imageType = 1, savePath = "upload/avatar")
    private String avatarPath; // 图片字段
}
